<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Erlang (programming language)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Erlang_(programming_language)"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Erlang_programming_language rootpage-Erlang_programming_language skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Erlang (programming language)</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p class="mw-empty-elt">
</p>
<style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1295905060">
/* start https://en.wikipedia.org/ */
.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}@media screen{html.skin-theme-clientpref-night .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media(min-width:640px){body.skin--responsive .mw-parser-output .infobox-table{display:table!important}body.skin--responsive .mw-parser-output .infobox-table>caption{display:table-caption!important}body.skin--responsive .mw-parser-output .infobox-table>tbody{display:table-row-group}body.skin--responsive .mw-parser-output .infobox-table th,body.skin--responsive .mw-parser-output .infobox-table td{padding-left:inherit;padding-right:inherit}}
/* end https://en.wikipedia.org/ */
</style><table class="infobox vevent"><tbody><tr><th colspan="2" class="infobox-above" style="background-color:#e0e0e0;">Erlang</th></tr><tr><td colspan="2" class="infobox-image"><span typeof="mw:File"></span></td></tr><tr><th scope="row" class="infobox-label"><a href="Programming_paradigm" title="Programming paradigm">Paradigms</a></th><td class="infobox-data"><a href="Multi-paradigm_programming_language" class="mw-redirect" title="Multi-paradigm programming language">Multi-paradigm</a>: <a href="Concurrent_programming" class="mw-redirect" title="Concurrent programming">concurrent</a>, <a href="Functional_programming" title="Functional programming">functional</a></td></tr><tr><th scope="row" class="infobox-label"><a href="Software_design" title="Software design">Designed by</a></th><td class="infobox-data"><style data-mw-deduplicate="TemplateStyles:r1126788409">
/* start https://en.wikipedia.org/ */
.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}
/* end https://en.wikipedia.org/ */
</style><div class="plainlist"><ul><li><a href="Joe_Armstrong_(programmer)" title="Joe Armstrong (programmer)">Joe Armstrong</a></li><li>Robert Virding</li><li>Mike Williams</li></ul></div></td></tr><tr><th scope="row" class="infobox-label"><a href="Software_developer" class="mw-redirect" title="Software developer">Developer</a></th><td class="infobox-data organiser"><a href="Ericsson" title="Ericsson">Ericsson</a></td></tr><tr><th scope="row" class="infobox-label">First appeared</th><td class="infobox-data">1986<span style="display:none"> (<span class="bday dtstart published updated">1986</span>)</span></td></tr><tr><td colspan="2" class="infobox-full-data"></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_release_life_cycle" title="Software release life cycle">Stable release</a></th><td class="infobox-data"><div style="margin:0px;">28.0.1<sup id="cite_ref-wikidata-a72907676312733fe0926a8d8647d217b3b22864-v20_1-0" class="reference"><a href="#cite_note-wikidata-a72907676312733fe0926a8d8647d217b3b22864-v20-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
/ 16 June 2025<span style="display:none"> (<span class="bday dtstart published updated">16 June 2025</span>)</span></div></td></tr><tr style="display:none"><td colspan="2">
</td></tr><tr><th scope="row" class="infobox-label"><a href="Type_system" title="Type system">Typing discipline</a></th><td class="infobox-data"><a href="Type_system" title="Type system">Dynamic</a>, <a href="Strong_typing" class="mw-redirect" title="Strong typing">strong</a></td></tr><tr><th scope="row" class="infobox-label"><a href="Software_license" title="Software license">License</a></th><td class="infobox-data"><a href="Apache_License_2.0" class="mw-redirect" title="Apache License 2.0">Apache License 2.0</a></td></tr><tr><th scope="row" class="infobox-label"><a href="Filename_extension" title="Filename extension">Filename extensions</a></th><td class="infobox-data">.erl, .hrl</td></tr><tr><th scope="row" class="infobox-label">Website</th><td class="infobox-data"><span class="url"><a rel="nofollow" class="external text" href="https://www.erlang.org">www<wbr>.erlang<wbr>.org</a></span></td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #EEEEEE;">Major <a href="Programming_language_implementation" title="Programming language implementation">implementations</a></th></tr><tr><td colspan="2" class="infobox-full-data">Erlang</td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #EEEEEE;">Influenced by</th></tr><tr><td colspan="2" class="infobox-full-data"><a href="Lisp_(programming_language)" title="Lisp (programming language)">Lisp</a>, <a href="PLEX_(programming_language)" title="PLEX (programming language)">PLEX</a>,<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> <a href="Prolog" title="Prolog">Prolog</a>, <a href="Smalltalk" title="Smalltalk">Smalltalk</a></td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #EEEEEE;">Influenced</th></tr><tr><td colspan="2" class="infobox-full-data"><a href="Akka_(toolkit)" title="Akka (toolkit)">Akka</a>, <a href="Clojure" title="Clojure">Clojure</a>,<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> <a href="Dart_(programming_language)" title="Dart (programming language)">Dart</a>, <a href="Elixir_(programming_language)" title="Elixir (programming language)">Elixir</a>, <a href="F_Sharp_(programming_language)" title="F Sharp (programming language)">F#</a>, <a href="Opa_(programming_language)" title="Opa (programming language)">Opa</a>, <a href="Oz_(programming_language)" title="Oz (programming language)">Oz</a>, <a href="Reia_(programming_language)" class="mw-redirect" title="Reia (programming language)">Reia</a>, <a href="Rust_(programming_language)" title="Rust (programming language)">Rust</a>,<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> <a href="Scala_(programming_language)" title="Scala (programming language)">Scala</a>, <a href="Go_(programming_language)" title="Go (programming language)">Go</a></td></tr><tr><td colspan="2" class="infobox-below hlist" style="border-top: 1px solid #aaa; padding-top: 3px;">
<ul><li><span class="noviewer" typeof="mw:File"></span> <a href="https://en.wikibooks.org/wiki/Erlang_Programming" class="extiw external" title="wikibooks:Erlang Programming">Erlang Programming</a> at Wikibooks</li></ul>
</td></tr></tbody></table>
<p><b>Erlang</b> (<span class="rt-commentedText nowrap"><span class="IPA nopopups noexcerpt" lang="en-fonipa">/<span style="border-bottom:1px dotted"><span title="/ˈ/: primary stress follows">ˈ</span><span title="/ɜːr/: 'ur' in 'fur'">ɜːr</span><span title="'l' in 'lie'">l</span><span title="/æ/: 'a' in 'bad'">æ</span><span title="/ŋ/: 'ng' in 'sing'">ŋ</span></span>/</span></span> <i title="English pronunciation respelling"><span style="font-size:90%">UR</span>-lang</i>) is a <a href="General-purpose_programming_language" title="General-purpose programming language">general-purpose</a>, <a href="Concurrent_computing" title="Concurrent computing">concurrent</a>, <a href="Functional_programming" title="Functional programming">functional</a> <a href="High-level_programming_language" title="High-level programming language">high-level</a> <a href="Programming_language" title="Programming language">programming language</a>, and a <a href="Garbage_collection_(computer_science)" title="Garbage collection (computer science)">garbage-collected</a> <a href="Runtime_system" title="Runtime system">runtime system</a>. The term Erlang is used interchangeably with Erlang/OTP, or <a href="Open_Telecom_Platform" title="Open Telecom Platform">Open Telecom Platform</a> (OTP), which consists of the Erlang <a href="Runtime_system" title="Runtime system">runtime system</a>, several ready-to-use components (OTP) mainly written in Erlang, and a set of <a href="Systems_architecture" title="Systems architecture">design principles</a> for Erlang programs.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p><p>The Erlang <a href="Runtime_system" title="Runtime system">runtime system</a> is designed for systems with these traits:
</p>
<ul><li><a href="Distributed_computing" title="Distributed computing">Distributed</a></li>
<li><a href="Fault_tolerance" title="Fault tolerance">Fault-tolerant</a></li>
<li><a href="Soft_real-time" class="mw-redirect" title="Soft real-time">Soft real-time</a></li>
<li><a href="High_availability" title="High availability">Highly available</a>, <a href="Uptime" title="Uptime">non-stop</a> applications</li>
<li><a href="Hot_swapping#Software" title="Hot swapping">Hot swapping</a>, where code can be changed without stopping a system.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup></li></ul>
<p>The Erlang <a href="Programming_language" title="Programming language">programming language</a> has data, <a href="Pattern_matching" title="Pattern matching">pattern matching</a>, and <a href="Functional_programming" title="Functional programming">functional programming</a>.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> The sequential subset of the Erlang language supports <a href="Eager_evaluation" class="mw-redirect" title="Eager evaluation">eager evaluation</a>, <a href="Single_assignment" class="mw-redirect" title="Single assignment">single assignment</a>, and <a href="Dynamic_typing" class="mw-redirect" title="Dynamic typing">dynamic typing</a>.
</p><p>A normal Erlang application is built out of hundreds of small Erlang processes.
</p><p>It was originally <a href="Proprietary_software" title="Proprietary software">proprietary software</a> within <a href="Ericsson" title="Ericsson">Ericsson</a>, developed by <a href="Joe_Armstrong_(programmer)" title="Joe Armstrong (programmer)">Joe Armstrong</a>, Robert Virding, and Mike Williams in 1986,<sup id="cite_ref-hopl_8-0" class="reference"><a href="#cite_note-hopl-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> but was released as <a href="Free_and_open-source_software" title="Free and open-source software">free and open-source software</a> in 1998.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> Erlang/OTP is supported and maintained by the Open Telecom Platform (OTP) product unit at <a href="Ericsson" title="Ericsson">Ericsson</a>.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="History">History</h2></div>
<p>The name <i>Erlang</i>, attributed to Bjarne Däcker, has been presumed by those working on the telephony switches (for whom the language was designed) to be a reference to Danish mathematician and engineer <a href="Agner_Krarup_Erlang" title="Agner Krarup Erlang">Agner Krarup Erlang</a> and a <a href="Abbreviation#Syllabic_abbreviation" title="Abbreviation">syllabic abbreviation</a> of "Ericsson Language".<sup id="cite_ref-hopl_8-1" class="reference"><a href="#cite_note-hopl-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> Erlang was designed with the aim of improving the development of telephony applications.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> The initial version of Erlang was implemented in <a href="Prolog" title="Prolog">Prolog</a> and was influenced by the programming language <a href="PLEX_(programming_language)" title="PLEX (programming language)">PLEX</a> used in earlier Ericsson exchanges. By 1988 Erlang had proven that it was suitable for prototyping telephone exchanges, but the Prolog interpreter was far too slow. One group within Ericsson estimated that it would need to be 40 times faster to be suitable for production use. In 1992, work began on the <a href="BEAM_(Erlang_virtual_machine)" title="BEAM (Erlang virtual machine)">BEAM</a> <a href="Virtual_machine" title="Virtual machine">virtual machine</a> (VM), which compiles Erlang to C using a mix of natively compiled code and <a href="Threaded_code" title="Threaded code">threaded code</a> to strike a balance between performance and disk space.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup> According to co-inventor Joe Armstrong, the language went from laboratory product to real applications following the collapse of the next-generation <a href="AXE_telephone_exchange" title="AXE telephone exchange">AXE telephone exchange</a> named <a href="https://sv.wikipedia.org/wiki/AXE-N" class="extiw external" title="sv:AXE-N"><i>AXE-N</i></a> in 1995. As a result, Erlang was chosen for the next <a href="Asynchronous_Transfer_Mode" title="Asynchronous Transfer Mode">Asynchronous Transfer Mode</a> (ATM) exchange <i>AXD</i>.<sup id="cite_ref-hopl_8-2" class="reference"><a href="#cite_note-hopl-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p>
<p>In February 1998, Ericsson Radio Systems banned the in-house use of Erlang for new products, citing a preference for non-proprietary languages.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup> The ban caused Armstrong and others to make plans to leave Ericsson.<sup id="cite_ref-questions_16-0" class="reference"><a href="#cite_note-questions-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> In March 1998 Ericsson announced the AXD301 switch,<sup id="cite_ref-hopl_8-3" class="reference"><a href="#cite_note-hopl-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> containing over a million lines of Erlang and reported to achieve a <a href="High_availability" title="High availability">high availability</a> of <a href="Nines_(engineering)" class="mw-redirect" title="Nines (engineering)">nine "9"s</a>.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup> In December 1998, the implementation of Erlang was open-sourced and most of the Erlang team resigned to form a new company, Bluetail AB.<sup id="cite_ref-hopl_8-4" class="reference"><a href="#cite_note-hopl-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> Ericsson eventually relaxed the ban and re-hired Armstrong in 2004.<sup id="cite_ref-questions_16-1" class="reference"><a href="#cite_note-questions-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup>
</p><p>In 2006, native <a href="Symmetric_multiprocessing" title="Symmetric multiprocessing">symmetric multiprocessing</a> support was added to the runtime system and VM.<sup id="cite_ref-hopl_8-5" class="reference"><a href="#cite_note-hopl-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Processes">Processes</h3></div>
<p>Erlang applications are built of very lightweight Erlang processes in the Erlang runtime system. The Erlang runtime system provides strict <a href="Process_isolation" title="Process isolation">process isolation</a> between Erlang processes (this includes data and garbage collection, separated individually by each Erlang process) and transparent communication between processes (see <a href="Location_transparency" title="Location transparency">Location transparency</a>) on different Erlang nodes (on different hosts).
</p><p>Joe Armstrong, co-inventor of Erlang, summarized the principles of processes in his <a href="Doctor_of_Philosophy" title="Doctor of Philosophy">PhD</a> <a href="Thesis" title="Thesis">thesis</a>:<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li>Everything is a process.</li>
<li>Processes are strongly isolated.</li>
<li>Process creation and destruction is a lightweight operation.</li>
<li>Message passing is the only way for processes to interact.</li>
<li>Processes have unique names.</li>
<li>If you know the name of a process you can send it a message.</li>
<li>Processes share no resources.</li>
<li>Error handling is non-local.</li>
<li>Processes do what they are supposed to do or fail.</li></ul>
<p>Joe Armstrong remarked in an interview with Rackspace in 2013: "If <a href="Java_(programming_language)" title="Java (programming language)">Java</a> is '<a href="Write_once%2C_run_anywhere" title="Write once, run anywhere">write once, run anywhere</a>', then Erlang is 'write once, run forever'."<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Usage">Usage</h3></div>
<p>In 2014, <a href="Ericsson" title="Ericsson">Ericsson</a> reported Erlang was being used in its support nodes, and in <a href="GPRS" title="GPRS">GPRS</a>, <a href="3G" title="3G">3G</a> and <a href="LTE_(telecommunication)" title="LTE (telecommunication)">LTE</a> mobile networks worldwide and also by <a href="Nortel" title="Nortel">Nortel</a> and <a href="Deutsche_Telekom" title="Deutsche Telekom">Deutsche Telekom</a>.<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup>
</p><p>Erlang is used in <a href="RabbitMQ" title="RabbitMQ">RabbitMQ</a>. As <a href="Tim_Bray" title="Tim Bray">Tim Bray</a>, director of Web Technologies at <a href="Sun_Microsystems" title="Sun Microsystems">Sun Microsystems</a>, expressed in his keynote at <a href="O'Reilly_Open_Source_Convention" title="O'Reilly Open Source Convention">O'Reilly Open Source Convention</a> (OSCON) in July 2008:
</p>
<style data-mw-deduplicate="TemplateStyles:r1244412712">
/* start https://en.wikipedia.org/ */
.mw-parser-output .templatequote{overflow:hidden;margin:1em 0;padding:0 32px}.mw-parser-output .templatequotecite{line-height:1.5em;text-align:left;margin-top:0}@media(min-width:500px){.mw-parser-output .templatequotecite{padding-left:1.6em}}
/* end https://en.wikipedia.org/ */
</style><blockquote class="templatequote"><p>If somebody came to me and wanted to pay me a lot of money to build a large scale message handling system that really had to be up all the time, could never afford to go down for years at a time, I would unhesitatingly choose Erlang to build it in.</p></blockquote>
<p>Erlang is the programming language used to code <a href="WhatsApp" title="WhatsApp">WhatsApp</a>.<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup>
</p><p>It is also the language of choice for <a href="Ejabberd" title="Ejabberd">Ejabberd</a> – an <a href="XMPP" title="XMPP">XMPP</a> messaging server.
</p><p><a href="Elixir_(programming_language)" title="Elixir (programming language)">Elixir</a> is a programming language that compiles into BEAM byte code (via Erlang Abstract Format).<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup>
</p><p>Since being released as open source, Erlang has been spreading beyond telecoms, establishing itself in other vertical markets such as FinTech, gaming, healthcare, automotive, <a href="Internet_of_things" title="Internet of things">Internet of Things</a> and blockchain. Apart from WhatsApp, there are other companies listed as Erlang's success stories, including <a href="Vocalink" title="Vocalink">Vocalink</a> (a MasterCard company), <a href="Goldman_Sachs" title="Goldman Sachs">Goldman Sachs</a>, <a href="Nintendo" title="Nintendo">Nintendo</a>, AdRoll, <a href="Grindr" title="Grindr">Grindr</a>, <a href="BT_Mobile" title="BT Mobile">BT Mobile</a>, <a href="Samsung" title="Samsung">Samsung</a>, <a href="OpenX_(company)" class="mw-redirect" title="OpenX (company)">OpenX</a>, and <a href="SITA_(business_services_company)" title="SITA (business services company)">SITA</a>.<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Functional_programming_examples">Functional programming examples</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Factorial">Factorial</h3></div>
<p>A <a href="Factorial" title="Factorial">factorial</a> algorithm implemented in Erlang:
</p>
<div class="mw-highlight mw-highlight-lang-erlang mw-content-ltr" dir="ltr"><pre><span class="p">-</span><span class="ni">module</span><span class="p">(</span><span class="n">fact</span><span class="p">).</span><span class="w"> </span><span class="c">% This is the file 'fact.erl', the module and the filename must match</span>
<span class="p">-</span><span class="ni">export</span><span class="p">([</span><span class="n">fac</span><span class="o">/</span><span class="mi">1</span><span class="p">]).</span><span class="w"> </span><span class="c">% This exports the function 'fac' of arity 1 (1 parameter, no type, no name)</span>
<span class="nf">fac</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="c">% If 0, then return 1, otherwise (note the semicolon ; meaning 'else')</span>
<span class="nf">fac</span><span class="p">(</span><span class="nv">N</span><span class="p">)</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="nv">N</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nb">is_integer</span><span class="p">(</span><span class="nv">N</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="nv">N</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">fac</span><span class="p">(</span><span class="nv">N</span><span class="o">-</span><span class="mi">1</span><span class="p">).</span>
<span class="c">% Recursively determine, then return the result</span>
<span class="c">% (note the period . meaning 'endif' or 'function end')</span>
<span class="c">%% This function will crash if anything other than a nonnegative integer is given.</span>
<span class="c">%% It illustrates the "Let it crash" philosophy of Erlang.</span>
</pre></div>
<div class="mw-heading mw-heading3"><h3 id="Fibonacci_sequence">Fibonacci sequence</h3></div>
<p>A tail recursive algorithm that produces the <a href="Fibonacci_sequence" title="Fibonacci sequence">Fibonacci sequence</a>:
</p>
<div class="mw-highlight mw-highlight-lang-erlang mw-content-ltr" dir="ltr"><pre><span class="c">%% The module declaration must match the file name "series.erl" </span>
<span class="p">-</span><span class="ni">module</span><span class="p">(</span><span class="n">series</span><span class="p">).</span>
<span class="c">%% The export statement contains a list of all those functions that form</span>
<span class="c">%% the module's public API. In this case, this module exposes a single</span>
<span class="c">%% function called fib that takes 1 argument (I.E. has an arity of 1)</span>
<span class="c">%% The general syntax for -export is a list containing the name and</span>
<span class="c">%% arity of each public function</span>
<span class="p">-</span><span class="ni">export</span><span class="p">([</span><span class="n">fib</span><span class="o">/</span><span class="mi">1</span><span class="p">]).</span>
<span class="c">%% ---------------------------------------------------------------------</span>
<span class="c">%% Public API</span>
<span class="c">%% ---------------------------------------------------------------------</span>
<span class="c">%% Handle cases in which fib/1 receives specific values</span>
<span class="c">%% The order in which these function signatures are declared is a vital</span>
<span class="c">%% part of this module's functionality</span>
<span class="c">%% If fib/1 receives a negative number, then return the atom err_neg_val</span>
<span class="c">%% Normally, such defensive coding is discouraged due to Erlang's 'Let</span>
<span class="c">%% it Crash' philosophy, but here the result would be an infinite loop.</span>
<span class="nf">fib</span><span class="p">(</span><span class="nv">N</span><span class="p">)</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="nv">N</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">err_neg_val</span><span class="p">;</span>
<span class="c">%% If fib/1 is passed precisely the integer 0, then return 0</span>
<span class="nf">fib</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<span class="c">%% For all other values, call the private function fib_int/3 to perform</span>
<span class="c">%% the calculation</span>
<span class="nf">fib</span><span class="p">(</span><span class="nv">N</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">fib_int</span><span class="p">(</span><span class="nv">N</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">).</span>
<span class="c">%% ---------------------------------------------------------------------</span>
<span class="c">%% Private API</span>
<span class="c">%% ---------------------------------------------------------------------</span>
<span class="c">%% If fib_int/3 receives 0 as its first argument, then we're done, so</span>
<span class="c">%% return the value in argument B. The second argument is denoted _ to</span>
<span class="c">%% disregard its value.</span>
<span class="nf">fib_int</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="p">_,</span><span class="w"> </span><span class="nv">B</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="nv">B</span><span class="p">;</span>
<span class="c">%% For all other argument combinations, recursively call fib_int/3</span>
<span class="c">%% where each call does the following:</span>
<span class="c">%% - decrement counter N</span>
<span class="c">%% - pass the third argument as the new second argument</span>
<span class="c">%% - pass the sum of the second and third arguments as the new</span>
<span class="c">%% third argument</span>
<span class="nf">fib_int</span><span class="p">(</span><span class="nv">N</span><span class="p">,</span><span class="w"> </span><span class="nv">A</span><span class="p">,</span><span class="w"> </span><span class="nv">B</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">fib_int</span><span class="p">(</span><span class="nv">N</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="nv">B</span><span class="p">,</span><span class="w"> </span><span class="nv">A</span><span class="o">+</span><span class="nv">B</span><span class="p">).</span>
</pre></div>
<p>Omitting the comments gives a much shorter program.
</p>
<div class="mw-highlight mw-highlight-lang-erlang mw-content-ltr" dir="ltr"><pre><span class="p">-</span><span class="ni">module</span><span class="p">(</span><span class="n">series</span><span class="p">).</span>
<span class="p">-</span><span class="ni">export</span><span class="p">([</span><span class="n">fib</span><span class="o">/</span><span class="mi">1</span><span class="p">]).</span>
<span class="nf">fib</span><span class="p">(</span><span class="nv">N</span><span class="p">)</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="nv">N</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">err_neg_val</span><span class="p">;</span>
<span class="nf">fib</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<span class="nf">fib</span><span class="p">(</span><span class="nv">N</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">fib_int</span><span class="p">(</span><span class="nv">N</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">).</span>
<span class="nf">fib_int</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="p">_,</span><span class="w"> </span><span class="nv">B</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="nv">B</span><span class="p">;</span>
<span class="nf">fib_int</span><span class="p">(</span><span class="nv">N</span><span class="p">,</span><span class="w"> </span><span class="nv">A</span><span class="p">,</span><span class="w"> </span><span class="nv">B</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">fib_int</span><span class="p">(</span><span class="nv">N</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="nv">B</span><span class="p">,</span><span class="w"> </span><span class="nv">A</span><span class="o">+</span><span class="nv">B</span><span class="p">).</span>
</pre></div>
<div class="mw-heading mw-heading3"><h3 id="Quicksort">Quicksort</h3></div>
<p><a href="Quicksort" title="Quicksort">Quicksort</a> in Erlang, using <a href="List_comprehension" title="List comprehension">list comprehension</a>:<sup id="cite_ref-25" class="reference"><a href="#cite_note-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-highlight mw-highlight-lang-erlang mw-content-ltr" dir="ltr"><pre><span class="c">%% qsort:qsort(List)</span>
<span class="c">%% Sort a list of items</span>
<span class="p">-</span><span class="ni">module</span><span class="p">(</span><span class="n">qsort</span><span class="p">).</span><span class="w"> </span><span class="c">% This is the file 'qsort.erl'</span>
<span class="p">-</span><span class="ni">export</span><span class="p">([</span><span class="n">qsort</span><span class="o">/</span><span class="mi">1</span><span class="p">]).</span><span class="w"> </span><span class="c">% A function 'qsort' with 1 parameter is exported (no type, no name)</span>
<span class="nf">qsort</span><span class="p">([])</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">[];</span><span class="w"> </span><span class="c">% If the list [] is empty, return an empty list (nothing to sort)</span>
<span class="nf">qsort</span><span class="p">([</span><span class="nv">Pivot</span><span class="p">|</span><span class="nv">Rest</span><span class="p">])</span><span class="w"> </span><span class="o">-></span>
<span class="w"> </span><span class="c">% Compose recursively a list with 'Front' for all elements that should be before 'Pivot'</span>
<span class="w"> </span><span class="c">% then 'Pivot' then 'Back' for all elements that should be after 'Pivot'</span>
<span class="w"> </span><span class="n">qsort</span><span class="p">([</span><span class="nv">Front</span><span class="w"> </span><span class="p">||</span><span class="w"> </span><span class="nv">Front</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="nv">Rest</span><span class="p">,</span><span class="w"> </span><span class="nv">Front</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="nv">Pivot</span><span class="p">])</span><span class="w"> </span><span class="o">++</span><span class="w"> </span>
<span class="w"> </span><span class="p">[</span><span class="nv">Pivot</span><span class="p">]</span><span class="w"> </span><span class="o">++</span>
<span class="w"> </span><span class="n">qsort</span><span class="p">([</span><span class="nv">Back</span><span class="w"> </span><span class="p">||</span><span class="w"> </span><span class="nv">Back</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="nv">Rest</span><span class="p">,</span><span class="w"> </span><span class="nv">Back</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="nv">Pivot</span><span class="p">]).</span>
</pre></div>
<p>The above example recursively invokes the function <code>qsort</code> until nothing remains to be sorted. The expression <code>[Front || Front <- Rest, Front < Pivot]</code> is a <a href="List_comprehension" title="List comprehension">list comprehension</a>, meaning "Construct a list of elements <code>Front</code> such that <code>Front</code> is a member of <code>Rest</code>, and <code>Front</code> is less than <code>Pivot</code>." <code>++</code> is the list concatenation operator.
</p><p>A comparison function can be used for more complicated structures for the sake of readability.
</p><p>The following code would sort lists according to length:
</p>
<div class="mw-highlight mw-highlight-lang-erlang mw-content-ltr" dir="ltr"><pre><span class="c">% This is file 'listsort.erl' (the compiler is made this way)</span>
<span class="p">-</span><span class="ni">module</span><span class="p">(</span><span class="n">listsort</span><span class="p">).</span>
<span class="c">% Export 'by_length' with 1 parameter (don't care about the type and name)</span>
<span class="p">-</span><span class="ni">export</span><span class="p">([</span><span class="n">by_length</span><span class="o">/</span><span class="mi">1</span><span class="p">]).</span>
<span class="nf">by_length</span><span class="p">(</span><span class="nv">Lists</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="c">% Use 'qsort/2' and provides an anonymous function as a parameter</span>
<span class="w"> </span><span class="n">qsort</span><span class="p">(</span><span class="nv">Lists</span><span class="p">,</span><span class="w"> </span><span class="k">fun</span><span class="p">(</span><span class="nv">A</span><span class="p">,</span><span class="nv">B</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="nb">length</span><span class="p">(</span><span class="nv">A</span><span class="p">)</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="nb">length</span><span class="p">(</span><span class="nv">B</span><span class="p">)</span><span class="w"> </span><span class="k">end</span><span class="p">).</span>
<span class="nf">qsort</span><span class="p">([],</span><span class="w"> </span><span class="p">_)</span><span class="o">-></span><span class="w"> </span><span class="p">[];</span><span class="w"> </span><span class="c">% If list is empty, return an empty list (ignore the second parameter)</span>
<span class="nf">qsort</span><span class="p">([</span><span class="nv">Pivot</span><span class="p">|</span><span class="nv">Rest</span><span class="p">],</span><span class="w"> </span><span class="nv">Smaller</span><span class="p">)</span><span class="w"> </span><span class="o">-></span>
<span class="w"> </span><span class="c">% Partition list with 'Smaller' elements in front of 'Pivot' and not-'Smaller' elements</span>
<span class="w"> </span><span class="c">% after 'Pivot' and sort the sublists.</span>
<span class="w"> </span><span class="n">qsort</span><span class="p">([</span><span class="nv">X</span><span class="w"> </span><span class="p">||</span><span class="w"> </span><span class="nv">X</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="nv">Rest</span><span class="p">,</span><span class="w"> </span><span class="nv">Smaller</span><span class="p">(</span><span class="nv">X</span><span class="p">,</span><span class="nv">Pivot</span><span class="p">)],</span><span class="w"> </span><span class="nv">Smaller</span><span class="p">)</span>
<span class="w"> </span><span class="o">++</span><span class="w"> </span><span class="p">[</span><span class="nv">Pivot</span><span class="p">]</span><span class="w"> </span><span class="o">++</span>
<span class="w"> </span><span class="n">qsort</span><span class="p">([</span><span class="nv">Y</span><span class="w"> </span><span class="p">||</span><span class="w"> </span><span class="nv">Y</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="nv">Rest</span><span class="p">,</span><span class="w"> </span><span class="ow">not</span><span class="p">(</span><span class="nv">Smaller</span><span class="p">(</span><span class="nv">Y</span><span class="p">,</span><span class="w"> </span><span class="nv">Pivot</span><span class="p">))],</span><span class="w"> </span><span class="nv">Smaller</span><span class="p">).</span>
</pre></div>
<p>A <code>Pivot</code> is taken from the first parameter given to <code>qsort()</code> and the rest of <code>Lists</code> is named <code>Rest</code>. Note that the expression
</p>
<div class="mw-highlight mw-highlight-lang-erlang mw-content-ltr" dir="ltr"><pre><span class="p">[</span><span class="nv">X</span><span class="w"> </span><span class="p">||</span><span class="w"> </span><span class="nv">X</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="nv">Rest</span><span class="p">,</span><span class="w"> </span><span class="nv">Smaller</span><span class="p">(</span><span class="nv">X</span><span class="p">,</span><span class="nv">Pivot</span><span class="p">)]</span>
</pre></div>
<p>is no different in form from
</p>
<div class="mw-highlight mw-highlight-lang-erlang mw-content-ltr" dir="ltr"><pre><span class="p">[</span><span class="nv">Front</span><span class="w"> </span><span class="p">||</span><span class="w"> </span><span class="nv">Front</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="nv">Rest</span><span class="p">,</span><span class="w"> </span><span class="nv">Front</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="nv">Pivot</span><span class="p">]</span>
</pre></div>
<p>(in the previous example) except for the use of a comparison function in the last part, saying "Construct a list of elements <code>X</code> such that <code>X</code> is a member of <code>Rest</code>, and <code>Smaller</code> is true", with <code>Smaller</code> being defined earlier as
</p>
<div class="mw-highlight mw-highlight-lang-erlang mw-content-ltr" dir="ltr"><pre><span class="k">fun</span><span class="p">(</span><span class="nv">A</span><span class="p">,</span><span class="nv">B</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="nb">length</span><span class="p">(</span><span class="nv">A</span><span class="p">)</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="nb">length</span><span class="p">(</span><span class="nv">B</span><span class="p">)</span><span class="w"> </span><span class="k">end</span>
</pre></div>
<p>The <a href="Anonymous_function" title="Anonymous function">anonymous function</a> is named <code>Smaller</code> in the parameter list of the second definition of <code>qsort</code> so that it can be referenced by that name within that function. It is not named in the first definition of <code>qsort</code>, which deals with the base case of an empty list and thus has no need of this function, let alone a name for it.
</p>
<div class="mw-heading mw-heading2"><h2 id="Data_types">Data types</h2></div>
<p>Erlang has eight primitive <a href="Data_type" title="Data type">data types</a>:
</p>
<dl><dt>Integers</dt>
<dd>Integers are written as sequences of decimal digits, for example, 12, 12375 and -23427 are integers. Integer arithmetic is exact and only limited by available memory on the machine. (This is called <a href="Arbitrary-precision_arithmetic" title="Arbitrary-precision arithmetic">arbitrary-precision arithmetic</a>.)</dd>
<dt>Atoms</dt>
<dd>Atoms are used within a program to denote distinguished values. They are written as strings of consecutive alphanumeric characters, the first character being lowercase. Atoms can contain any character if they are enclosed within single quotes and an escape convention exists which allows any character to be used within an atom. Atoms are never garbage collected and should be used with caution, especially if using dynamic atom generation.</dd>
<dt>Floats</dt>
<dd>Floating point numbers use the <a href="Binary64" class="mw-redirect" title="Binary64">IEEE 754 64-bit representation</a>.</dd>
<dt>References</dt>
<dd>References are globally unique symbols whose only property is that they can be compared for equality. They are created by evaluating the Erlang primitive <code>make_ref()</code>.</dd>
<dt>Binaries</dt>
<dd>A binary is a sequence of bytes. Binaries provide a space-efficient way of storing binary data. Erlang primitives exist for composing and decomposing binaries and for efficient input/output of binaries.</dd>
<dt>Pids</dt>
<dd>Pid is short for <i>process identifier</i> – a Pid is created by the Erlang primitive <code>spawn(...)</code> Pids are references to Erlang processes.</dd>
<dt>Ports</dt>
<dd>Ports are used to communicate with the external world. Ports are created with the built-in function <code>open_port</code>. Messages can be sent to and received from ports, but these messages must obey the so-called "port protocol."</dd>
<dt>Funs</dt>
<dd>Funs are function <a href="Closure_(computer_programming)" title="Closure (computer programming)">closures</a>. Funs are created by expressions of the form: <code>fun(...) -> ... end</code>.</dd></dl>
<p>And three compound data types:
</p>
<dl><dt>Tuples</dt>
<dd>Tuples are containers for a fixed number of Erlang data types. The syntax <code>{D1,D2,...,Dn}</code> denotes a tuple whose arguments are <code>D1, D2, ... Dn.</code> The arguments can be primitive data types or compound data types. Any element of a tuple can be accessed in constant time.</dd>
<dt>Lists</dt>
<dd>Lists are containers for a variable number of Erlang data types. The syntax <code>[Dh|Dt]</code> denotes a list whose first element is <code>Dh</code>, and whose remaining elements are the list <code>Dt</code>. The syntax <code>[]</code> denotes an empty list. The syntax <code>[D1,D2,..,Dn]</code> is short for <code>[D1|[D2|..|[Dn|[]]]]</code>. The first element of a list can be accessed in constant time. The first element of a list is called the <i>head</i> of the list. The remainder of a list when its head has been removed is called the <i>tail</i> of the list.</dd>
<dt>Maps</dt>
<dd>Maps contain a variable number of key-value associations. The syntax is<code>#{Key1=>Value1,...,KeyN=>ValueN}</code>.</dd></dl>
<p>Two forms of <a href="Syntactic_sugar" title="Syntactic sugar">syntactic sugar</a> are provided:
</p>
<dl><dt>Strings</dt>
<dd>Strings are written as doubly quoted lists of characters. This is syntactic sugar for a list of the integer <a href="Unicode" title="Unicode">Unicode</a> code points for the characters in the string. Thus, for example, the string "cat" is shorthand for <code>[99,97,116]</code>.<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup></dd>
<dt>Records</dt>
<dd>Records provide a convenient way for associating a tag with each of the elements in a tuple. This allows one to refer to an element of a tuple by name and not by position. A pre-compiler takes the record definition and replaces it with the appropriate tuple reference.</dd></dl>
<div class="mw-heading mw-heading2"><h2 id=""Let_it_crash"_coding_style">"Let it crash" coding style</h2></div>
<p>Erlang is designed with a mechanism that makes it easy for external processes to monitor for crashes (or hardware failures), rather than an in-process mechanism like <a href="Exception_handling" title="Exception handling">exception handling</a> used in many other programming languages. Crashes are reported like other messages, which is the only way processes can communicate with each other,<sup id="cite_ref-Verraes_27-0" class="reference"><a href="#cite_note-Verraes-27"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup> and subprocesses can be spawned cheaply (see <a href="#Concurrency_and_distribution_orientation">below</a>). The "let it crash" philosophy prefers that a process be completely restarted rather than trying to recover from a serious failure.<sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup> Though it still requires handling of errors, this philosophy results in less code devoted to <a href="Defensive_programming" title="Defensive programming">defensive programming</a> where error-handling code is highly contextual and specific.<sup id="cite_ref-Verraes_27-1" class="reference"><a href="#cite_note-Verraes-27"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Supervisor_trees">Supervisor trees</h3></div>
<p>A typical Erlang application is written in the form of a supervisor tree. This architecture is based on a hierarchy of processes in which the top level process is known as a "supervisor". The supervisor then spawns multiple child processes that act either as workers or more, lower level supervisors. Such hierarchies can exist to arbitrary depths and have proven to provide a highly scalable and fault-tolerant environment within which application functionality can be implemented.
</p><p>Within a supervisor tree, all supervisor processes are responsible for managing the lifecycle of their child processes, and this includes handling situations in which those child processes crash. Any process can become a supervisor by first spawning a child process, then calling <code>erlang:monitor/2</code> on that process. If the monitored process then crashes, the supervisor will receive a message containing a tuple whose first member is the atom <code>'DOWN'</code>. The supervisor is responsible firstly for listening for such messages and for taking the appropriate action to correct the error condition.
</p>
<div class="mw-heading mw-heading2"><h2 id="Concurrency_and_distribution_orientation">Concurrency and distribution orientation</h2></div>
<p>Erlang's main strength is support for <a href="Concurrency_(computer_science)" title="Concurrency (computer science)">concurrency</a>. It has a small but powerful set of primitives to create processes and communicate among them. Erlang is conceptually similar to the language <a href="Occam_(programming_language)" title="Occam (programming language)">occam</a>, though it recasts the ideas of <a href="Communicating_sequential_processes" title="Communicating sequential processes">communicating sequential processes</a> (CSP) in a functional framework and uses asynchronous message passing.<sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup> Processes are the primary means to structure an Erlang application. They are neither <a href="Operating_system" title="Operating system">operating system</a> <a href="Process_(computing)" title="Process (computing)">processes</a> nor <a href="Thread_(computing)" title="Thread (computing)">threads</a>, but <a href="Light-weight_process" title="Light-weight process">lightweight processes</a> that are scheduled by BEAM. Like operating system processes (but unlike operating system threads), they share no state with each other. The estimated minimal overhead for each is 300 <a href="Word_(computer_architecture)" title="Word (computer architecture)">words</a>.<sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup> Thus, many processes can be created without degrading performance. In 2005, a benchmark with 20 million processes was successfully performed with 64-bit Erlang on a machine with 16 GB <a href="Random-access_memory" title="Random-access memory">random-access memory</a> (RAM; total 800 bytes/process).<sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup> Erlang has supported <a href="Symmetric_multiprocessing" title="Symmetric multiprocessing">symmetric multiprocessing</a> since release R11B of May 2006.
</p><p>While <a href="Thread_(computing)" title="Thread (computing)">threads</a> need external library support in most languages, Erlang provides language-level features to create and manage processes with the goal of simplifying concurrent programming. Though all concurrency is explicit in Erlang, processes communicate using <a href="Message_passing" title="Message passing">message passing</a> instead of shared variables, which removes the need for explicit <a href="Lock_(computer_science)" title="Lock (computer science)">locks</a> (a locking scheme is still used internally by the VM).<sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span class="cite-bracket">[</span>32<span class="cite-bracket">]</span></a></sup>
</p><p><a href="Inter-process_communication" title="Inter-process communication">Inter-process communication</a> works via a <a href="Shared-nothing_architecture" title="Shared-nothing architecture">shared-nothing</a> <a href="Asynchronous_method_dispatch" class="mw-redirect" title="Asynchronous method dispatch">asynchronous</a> <a href="Message_passing" title="Message passing">message passing</a> system: every process has a "mailbox", a <a href="Queue_(data_structure)" class="mw-redirect" title="Queue (data structure)">queue</a> of messages that have been sent by other processes and not yet consumed. A process uses the <code>receive</code> primitive to retrieve messages that match desired patterns. A message-handling routine tests messages in turn against each pattern, until one of them matches. When the message is consumed and removed from the mailbox the process resumes execution. A message may comprise any Erlang structure, including primitives (integers, floats, characters, atoms), tuples, lists, and functions.
</p><p>The code example below shows the built-in support for distributed processes:
</p>
<div class="mw-highlight mw-highlight-lang-erlang mw-content-ltr" dir="ltr"><pre><span class="w"> </span><span class="c">% Create a process and invoke the function web:start_server(Port, MaxConnections)</span>
<span class="w"> </span><span class="nv">ServerProcess</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">spawn</span><span class="p">(</span><span class="n">web</span><span class="p">,</span><span class="w"> </span><span class="n">start_server</span><span class="p">,</span><span class="w"> </span><span class="p">[</span><span class="nv">Port</span><span class="p">,</span><span class="w"> </span><span class="nv">MaxConnections</span><span class="p">]),</span>
<span class="w"> </span><span class="c">% Create a remote process and invoke the function</span>
<span class="w"> </span><span class="c">% web:start_server(Port, MaxConnections) on machine RemoteNode</span>
<span class="w"> </span><span class="nv">RemoteProcess</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">spawn</span><span class="p">(</span><span class="nv">RemoteNode</span><span class="p">,</span><span class="w"> </span><span class="n">web</span><span class="p">,</span><span class="w"> </span><span class="n">start_server</span><span class="p">,</span><span class="w"> </span><span class="p">[</span><span class="nv">Port</span><span class="p">,</span><span class="w"> </span><span class="nv">MaxConnections</span><span class="p">]),</span>
<span class="w"> </span><span class="c">% Send a message to ServerProcess (asynchronously). The message consists of a tuple</span>
<span class="w"> </span><span class="c">% with the atom "pause" and the number "10".</span>
<span class="w"> </span><span class="nv">ServerProcess</span><span class="w"> </span><span class="o">!</span><span class="w"> </span><span class="p">{</span><span class="n">pause</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">},</span>
<span class="w"> </span><span class="c">% Receive messages sent to this process</span>
<span class="w"> </span><span class="k">receive</span>
<span class="w"> </span><span class="n">a_message</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">do_something</span><span class="p">;</span>
<span class="w"> </span><span class="p">{</span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="nv">DataContent</span><span class="p">}</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">handle</span><span class="p">(</span><span class="nv">DataContent</span><span class="p">);</span>
<span class="w"> </span><span class="p">{</span><span class="n">hello</span><span class="p">,</span><span class="w"> </span><span class="nv">Text</span><span class="p">}</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="nn">io</span><span class="p">:</span><span class="nf">format</span><span class="p">(</span><span class="s">"Got hello message: </span><span class="si">~s</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="p">[</span><span class="nv">Text</span><span class="p">]);</span>
<span class="w"> </span><span class="p">{</span><span class="n">goodbye</span><span class="p">,</span><span class="w"> </span><span class="nv">Text</span><span class="p">}</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="nn">io</span><span class="p">:</span><span class="nf">format</span><span class="p">(</span><span class="s">"Got goodbye message: </span><span class="si">~s</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="p">[</span><span class="nv">Text</span><span class="p">])</span>
<span class="w"> </span><span class="k">end</span><span class="p">.</span>
</pre></div>
<p>As the example shows, processes may be created on remote nodes, and communication with them is transparent in the sense that communication with remote processes works exactly as communication with local processes.
</p><p>Concurrency supports the primary method of error-handling in Erlang. When a process crashes, it neatly exits and sends a message to the controlling process which can then take action, such as starting a new process that takes over the old process's task.<sup id="cite_ref-33" class="reference"><a href="#cite_note-33"><span class="cite-bracket">[</span>33<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-34" class="reference"><a href="#cite_note-34"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Implementation">Implementation</h2></div>
<p>The official <a href="Reference_implementation" title="Reference implementation">reference implementation</a> of Erlang uses <a href="BEAM_(Erlang_virtual_machine)" title="BEAM (Erlang virtual machine)">BEAM</a>.<sup id="cite_ref-35" class="reference"><a href="#cite_note-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup> BEAM is included in the official distribution of Erlang, called Erlang/OTP. BEAM executes <a href="Bytecode" title="Bytecode">bytecode</a> which is converted to <a href="Threaded_code" title="Threaded code">threaded code</a> at load time. It also includes a native code compiler on most platforms, developed by the High Performance Erlang Project (HiPE) at <a href="Uppsala_University" title="Uppsala University">Uppsala University</a>. Since October 2001 the HiPE system is fully integrated in Ericsson's Open Source Erlang/OTP system.<sup id="cite_ref-36" class="reference"><a href="#cite_note-36"><span class="cite-bracket">[</span>36<span class="cite-bracket">]</span></a></sup> It also supports interpreting, directly from source code via <a href="Abstract_syntax_tree" title="Abstract syntax tree">abstract syntax tree</a>, via script as of R11B-5 release of Erlang.
</p>
<div class="mw-heading mw-heading2"><h2 id="Hot_code_loading_and_modules">Hot code loading and modules</h2></div>
<p>Erlang supports language-level <a href="Dynamic_Software_Updating" class="mw-redirect" title="Dynamic Software Updating">Dynamic Software Updating</a>. To implement this, code is loaded and managed as "module" units; the module is a <a href="Compilation_unit" class="mw-redirect" title="Compilation unit">compilation unit</a>. The system can keep two versions of a module in memory at the same time, and processes can concurrently run code from each. The versions are referred to as the "new" and the "old" version. A process will not move into the new version until it makes an external call to its module.
</p><p>An example of the mechanism of hot code loading:
</p>
<div class="mw-highlight mw-highlight-lang-erlang mw-content-ltr" dir="ltr"><pre><span class="w"> </span><span class="c">%% A process whose only job is to keep a counter.</span>
<span class="w"> </span><span class="c">%% First version</span>
<span class="w"> </span><span class="o">-</span><span class="n">module</span><span class="p">(</span><span class="n">counter</span><span class="p">).</span>
<span class="w"> </span><span class="o">-</span><span class="n">export</span><span class="p">([</span><span class="n">start</span><span class="o">/</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">codeswitch</span><span class="o">/</span><span class="mi">1</span><span class="p">]).</span>
<span class="w"> </span><span class="n">start</span><span class="p">()</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">loop</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span>
<span class="w"> </span><span class="n">loop</span><span class="p">(</span><span class="nv">Sum</span><span class="p">)</span><span class="w"> </span><span class="o">-></span>
<span class="w"> </span><span class="k">receive</span>
<span class="w"> </span><span class="p">{</span><span class="n">increment</span><span class="p">,</span><span class="w"> </span><span class="nv">Count</span><span class="p">}</span><span class="w"> </span><span class="o">-></span>
<span class="w"> </span><span class="n">loop</span><span class="p">(</span><span class="nv">Sum</span><span class="o">+</span><span class="nv">Count</span><span class="p">);</span>
<span class="w"> </span><span class="p">{</span><span class="n">counter</span><span class="p">,</span><span class="w"> </span><span class="nv">Pid</span><span class="p">}</span><span class="w"> </span><span class="o">-></span>
<span class="w"> </span><span class="nv">Pid</span><span class="w"> </span><span class="o">!</span><span class="w"> </span><span class="p">{</span><span class="n">counter</span><span class="p">,</span><span class="w"> </span><span class="nv">Sum</span><span class="p">},</span>
<span class="w"> </span><span class="n">loop</span><span class="p">(</span><span class="nv">Sum</span><span class="p">);</span>
<span class="w"> </span><span class="n">code_switch</span><span class="w"> </span><span class="o">-></span>
<span class="w"> </span><span class="o">?</span><span class="nv">MODULE</span><span class="p">:</span><span class="nf">codeswitch</span><span class="p">(</span><span class="nv">Sum</span><span class="p">)</span>
<span class="w"> </span><span class="c">% Force the use of 'codeswitch/1' from the latest MODULE version</span>
<span class="w"> </span><span class="k">end</span><span class="p">.</span>
<span class="w"> </span><span class="n">codeswitch</span><span class="p">(</span><span class="nv">Sum</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">loop</span><span class="p">(</span><span class="nv">Sum</span><span class="p">).</span>
</pre></div>
<p>For the second version, we add the possibility to reset the count to zero.
</p>
<div class="mw-highlight mw-highlight-lang-erlang mw-content-ltr" dir="ltr"><pre><span class="w"> </span><span class="c">%% Second version</span>
<span class="w"> </span><span class="o">-</span><span class="n">module</span><span class="p">(</span><span class="n">counter</span><span class="p">).</span>
<span class="w"> </span><span class="o">-</span><span class="n">export</span><span class="p">([</span><span class="n">start</span><span class="o">/</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">codeswitch</span><span class="o">/</span><span class="mi">1</span><span class="p">]).</span>
<span class="w"> </span><span class="n">start</span><span class="p">()</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">loop</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span>
<span class="w"> </span><span class="n">loop</span><span class="p">(</span><span class="nv">Sum</span><span class="p">)</span><span class="w"> </span><span class="o">-></span>
<span class="w"> </span><span class="k">receive</span>
<span class="w"> </span><span class="p">{</span><span class="n">increment</span><span class="p">,</span><span class="w"> </span><span class="nv">Count</span><span class="p">}</span><span class="w"> </span><span class="o">-></span>
<span class="w"> </span><span class="n">loop</span><span class="p">(</span><span class="nv">Sum</span><span class="o">+</span><span class="nv">Count</span><span class="p">);</span>
<span class="w"> </span><span class="n">reset</span><span class="w"> </span><span class="o">-></span>
<span class="w"> </span><span class="n">loop</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
<span class="w"> </span><span class="p">{</span><span class="n">counter</span><span class="p">,</span><span class="w"> </span><span class="nv">Pid</span><span class="p">}</span><span class="w"> </span><span class="o">-></span>
<span class="w"> </span><span class="nv">Pid</span><span class="w"> </span><span class="o">!</span><span class="w"> </span><span class="p">{</span><span class="n">counter</span><span class="p">,</span><span class="w"> </span><span class="nv">Sum</span><span class="p">},</span>
<span class="w"> </span><span class="n">loop</span><span class="p">(</span><span class="nv">Sum</span><span class="p">);</span>
<span class="w"> </span><span class="n">code_switch</span><span class="w"> </span><span class="o">-></span>
<span class="w"> </span><span class="o">?</span><span class="nv">MODULE</span><span class="p">:</span><span class="nf">codeswitch</span><span class="p">(</span><span class="nv">Sum</span><span class="p">)</span>
<span class="w"> </span><span class="k">end</span><span class="p">.</span>
<span class="w"> </span><span class="n">codeswitch</span><span class="p">(</span><span class="nv">Sum</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">loop</span><span class="p">(</span><span class="nv">Sum</span><span class="p">).</span>
</pre></div>
<p>Only when receiving a message consisting of the atom <code>code_switch</code> will the loop execute an external call to codeswitch/1 (<code>?MODULE</code> is a preprocessor macro for the current module). If there is a new version of the <i>counter</i> module in memory, then its codeswitch/1 function will be called. The practice of having a specific entry-point into a new version allows the programmer to transform state to what is needed in the newer version. In the example, the state is kept as an integer.
</p><p>In practice, systems are built up using design principles from the Open Telecom Platform, which leads to more code upgradable designs. Successful hot code loading is exacting. Code must be written with care to make use of Erlang's facilities.
</p>
<div class="mw-heading mw-heading2"><h2 id="Distribution">Distribution</h2></div>
<p>In 1998, Ericsson released Erlang as <a href="Free_and_open-source_software" title="Free and open-source software">free and open-source software</a> to ensure its independence from a single vendor and to increase awareness of the language. Erlang, together with libraries and the real-time distributed database <a href="Mnesia" title="Mnesia">Mnesia</a>, forms the OTP collection of libraries. Ericsson and a few other companies support Erlang commercially.
</p><p>Since the open source release, Erlang has been used by several firms worldwide, including <a href="Nortel_Networks" class="mw-redirect" title="Nortel Networks">Nortel</a> and <a href="Deutsche_Telekom" title="Deutsche Telekom">Deutsche Telekom</a>.<sup id="cite_ref-37" class="reference"><a href="#cite_note-37"><span class="cite-bracket">[</span>37<span class="cite-bracket">]</span></a></sup> Although Erlang was designed to fill a niche and has remained an obscure language for most of its existence, its popularity is growing due to demand for concurrent services.<sup id="cite_ref-38" class="reference"><a href="#cite_note-38"><span class="cite-bracket">[</span>38<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-39" class="reference"><a href="#cite_note-39"><span class="cite-bracket">[</span>39<span class="cite-bracket">]</span></a></sup>
Erlang has found some use in fielding <a href="Massively_multiplayer_online_role-playing_game" title="Massively multiplayer online role-playing game">massively multiplayer online role-playing game</a> (MMORPG) servers.<sup id="cite_ref-40" class="reference"><a href="#cite_note-40"><span class="cite-bracket">[</span>40<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Elixir_(programming_language)" title="Elixir (programming language)">Elixir</a> – a functional, concurrent, general-purpose programming language that runs on BEAM</li>
<li>Luerl - Lua on the BEAM, designed and implemented by one of the creators of Erlang.</li>
<li><a href="LFE_(programming_language)" title="LFE (programming language)">Lisp Flavored Erlang</a> (LFE) – a Lisp-based programming language that runs on BEAM</li>
<li><a href="Mix_(build_tool)" title="Mix (build tool)">Mix (build tool)</a></li>
<li><a href="Phoenix_(web_framework)" title="Phoenix (web framework)">Phoenix (web framework)</a></li>
<li><a href="Gleam_(programming_language)" title="Gleam (programming language)">Gleam (programming language)</a> – a general-purpose, concurrent, functional high-level programming language that compiles to Erlang</li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist reflist-columns references-column-width" style="column-width: 30em;">
<ol class="references">
<li id="cite_note-wikidata-a72907676312733fe0926a8d8647d217b3b22864-v20-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-wikidata-a72907676312733fe0926a8d8647d217b3b22864-v20_1-0">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/erlang/otp/releases/tag/OTP-28.0.1">"Release 28.0.1"</a>. 16 June 2025<span class="reference-accessdate">. Retrieved <span class="nowrap">16 July</span> 2025</span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite id="CITEREFConferences2014" class="citation web cs1">Conferences, N. D. C. (4 June 2014). <a rel="nofollow" class="external text" href="https://vimeo.com/97329186">"Joe Armstrong - Functional Programming the Long Road to Enlightenment: a Historical and Personal Narrative"</a>. Vimeo.</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://radar.oreilly.com/2011/06/clojure-java-lisp-jvm.html">"Clojure: Lisp meets Java, with a side of Erlang - O'Reilly Radar"</a>. <i>radar.oreilly.com</i>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://doc.rust-lang.org/reference/influences.html">"Influences - The Rust Reference"</a>. <i>The Rust Reference</i><span class="reference-accessdate">. Retrieved <span class="nowrap">18 April</span> 2023</span>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20190908105859/http://erlang.org/doc/system_architecture_intro/sys_arch_intro.html#id58791">"Erlang – Introduction"</a>. <i>erlang.org</i>. Archived from <a rel="nofollow" class="external text" href="http://erlang.org/doc/system_architecture_intro/sys_arch_intro.html#id58791">the original</a> on 8 September 2019<span class="reference-accessdate">. Retrieved <span class="nowrap">6 February</span> 2017</span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite id="CITEREFArmstrongDäckerLindgrenMillroth" class="citation web cs1">Armstrong, Joe; Däcker, Bjarne; Lindgren, Thomas; Millroth, Håkan. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20111025022940/http://ftp.sunet.se/pub/lang/erlang/white_paper.html">"Open-source Erlang – White Paper"</a>. Archived from <a rel="nofollow" class="external text" href="http://ftp.sunet.se/pub/lang/erlang/white_paper.html">the original</a> on 25 October 2011<span class="reference-accessdate">. Retrieved <span class="nowrap">31 July</span> 2011</span>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text">Hitchhiker’s Tour of the BEAM – Robert Virding <a rel="nofollow" class="external free" href="http://www.erlang-factory.com/upload/presentations/708/HitchhikersTouroftheBEAM.pdf">http://www.erlang-factory.com/upload/presentations/708/HitchhikersTouroftheBEAM.pdf</a></span>
</li>
<li id="cite_note-hopl-8"><span class="mw-cite-backlink">^ <a href="#cite_ref-hopl_8-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-hopl_8-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-hopl_8-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-hopl_8-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-hopl_8-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-hopl_8-5"><sup><i><b>f</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFArmstrong2007" class="citation conference cs1">Armstrong, Joe (2007). <i>History of Erlang</i>. <i>HOPL III: Proceedings of the third ACM SIGPLAN conference on History of programming languages</i>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-59593-766-7</bdi>.</cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20190222070551/https://www.cio.com/article/3020454/open-source-tools/how-tech-giants-spread-open-source-programming-love.html">"How tech giants spread open source programming love - CIO.com"</a>. 8 January 2016. Archived from <a rel="nofollow" class="external text" href="http://www.cio.com/article/3020454/open-source-tools/how-tech-giants-spread-open-source-programming-love.html">the original</a> on 22 February 2019<span class="reference-accessdate">. Retrieved <span class="nowrap">5 September</span> 2016</span>.</cite></span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/19991009002753/http://www.erlang.se/onlinenews/ErlangOTPos.shtml">"Erlang/OTP Released as Open Source, 1998-12-08"</a>. Archived from <a rel="nofollow" class="external text" href="http://www.erlang.se/onlinenews/ErlangOTPos.shtml">the original</a> on 9 October 1999.</cite></span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.erlang.org/pipermail/erlang-questions/1999-February/000098.html">"Erlang, the mathematician?"</a>. February 1999.</cite></span>
</li>
<li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://foldoc.org/Erlang">"Free Online Dictionary of Computing: Erlang"</a>.</cite></span>
</li>
<li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://erlang.org/course/history.html">"History of Erlang"</a>. <i>Erlang.org</i>.</cite></span>
</li>
<li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><cite id="CITEREFArmstrong1997" class="citation book cs1">Armstrong, Joe (August 1997). "The development of Erlang". <i>Proceedings of the second ACM SIGPLAN international conference on Functional programming</i>. Vol. 32. pp. <span class="nowrap">196–</span>203. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F258948.258967">10.1145/258948.258967</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>0897919181</bdi>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:6821037">6821037</a>.</cite> <span class="cs1-visible-error citation-comment"><code class="cs1-code">{{cite book}}</code>: </span><span class="cs1-visible-error citation-comment"><code class="cs1-code">|journal=</code> ignored (help)</span></span>
</li>
<li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><cite id="CITEREFDäcker2000" class="citation thesis cs1">Däcker, Bjarne (October 2000). <a rel="nofollow" class="external text" href="https://cogsys.uni-bamberg.de/team/schmid/uoshp/lehreuos/fp01-www/fp-referate/erlang/bjarnelic.pdf#page=45"><i>Concurrent Functional Programming for Telecommunications: A Case Study of Technology Introduction</i></a> <span class="cs1-format">(PDF)</span> (Thesis). Royal Institute of Technology. p. 37.</cite></span>
</li>
<li id="cite_note-questions-16"><span class="mw-cite-backlink">^ <a href="#cite_ref-questions_16-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-questions_16-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://erlang.org/pipermail/erlang-questions/2006-July/021368.html">"question about Erlang's future"</a>. 6 July 2010.</cite></span>
</li>
<li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text">
<cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.rabbitmq.com/resources/armstrong.pdf">"Concurrency Oriented Programming in Erlang"</a> <span class="cs1-format">(PDF)</span>. 9 November 2002.</cite></span>
</li>
<li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><cite id="CITEREFArmstrong2003" class="citation thesis cs1">Armstrong, Joe (20 November 2003). <i>Making reliable distributed systems in the presence of software errors</i> (DTech thesis). Stockholm, Sweden: The Royal Institute of Technology.</cite></span>
</li>
<li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><cite id="CITEREFMcGreggor2013" class="citation audio-visual cs1">McGreggor, Duncan (26 March 2013). <a rel="nofollow" class="external text" href="https://www.youtube.com/watch?v=u41GEwIq2mE&t=3m59s"><i>Rackspace takes a look at the Erlang programming language for distributed computing</i></a> (Video). Rackspace Studios, SFO. <a rel="nofollow" class="external text" href="https://ghostarchive.org/varchive/youtube/20211211/u41GEwIq2mE">Archived</a> from the original on 11 December 2021<span class="reference-accessdate">. Retrieved <span class="nowrap">24 April</span> 2019</span>.</cite></span>
</li>
<li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.ericsson.com/news/141204-inside-erlang-creator-joe-armstrong-tells-his-story_244099435_c">"Ericsson"</a>. <i>Ericsson.com</i>. 4 December 2014<span class="reference-accessdate">. Retrieved <span class="nowrap">7 April</span> 2018</span>.</cite></span>
</li>
<li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.fastcompany.com/3026758/inside-erlang-the-rare-programming-language-behind-whatsapps-success">"Inside Erlang, The Rare Programming Language Behind WhatsApp's Success"</a>. <i>fastcompany.com</i>. 21 February 2014<span class="reference-accessdate">. Retrieved <span class="nowrap">12 November</span> 2019</span>.</cite></span>
</li>
<li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://elixir-lang.org/crash-course.html">"Erlang/Elixir Syntax: A Crash Course"</a>. <i>elixir-lang.github.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">10 October</span> 2022</span>.</cite></span>
</li>
<li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.erlang-solutions.com/blog/which-companies-are-using-erlang-and-why-mytopdogstatus.html">"Which companies are using Erlang, and why? #MyTopdogStatus"</a>. <i>erlang-solutions.com</i>. 11 September 2019<span class="reference-accessdate">. Retrieved <span class="nowrap">15 March</span> 2020</span>.</cite></span>
</li>
<li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.erlang-solutions.com/blog/which-new-companies-are-using-erlang-and-elixir-mytopdogstatus.html">"Which new companies are using Erlang and Elixir? #MyTopdogStatus"</a>. <i>erlang-solutions.com</i>. 2 March 2020<span class="reference-accessdate">. Retrieved <span class="nowrap">24 June</span> 2020</span>.</cite></span>
</li>
<li id="cite_note-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-25">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://erlang.org/doc/programming_examples/list_comprehensions.html">"Erlang – List Comprehensions"</a>. <i>erlang.org</i>.</cite></span>
</li>
<li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://erlang.org/doc/apps/stdlib/unicode_usage.html#string-and-character-literals">"String and Character Literals"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2 May</span> 2015</span>.</cite></span>
</li>
<li id="cite_note-Verraes-27"><span class="mw-cite-backlink">^ <a href="#cite_ref-Verraes_27-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Verraes_27-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFVerraes2014" class="citation web cs1">Verraes, Mathias (9 December 2014). <a rel="nofollow" class="external text" href="https://verraes.net/2014/12/erlang-let-it-crash/">"Let It Crash"</a>. <i>Mathias Verraes' Blog</i><span class="reference-accessdate">. Retrieved <span class="nowrap">10 February</span> 2021</span>.</cite></span>
</li>
<li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.reactivedesignpatterns.com/patterns/let-it-crash.html">"Reactive Design Patterns —"</a>. <i>www.reactivedesignpatterns.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">10 February</span> 2021</span>.</cite></span>
</li>
<li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-29">^</a></b></span> <span class="reference-text"><cite id="CITEREFArmstrong2010" class="citation journal cs1"><a href="Joe_Armstrong_(programmer)" title="Joe Armstrong (programmer)">Armstrong, Joe</a> (September 2010). <a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F1810891.1810910">"Erlang"</a>. <i><a href="Communications_of_the_ACM" title="Communications of the ACM">Communications of the ACM</a></i>. <b>53</b> (9): <span class="nowrap">68–</span>75. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F1810891.1810910">10.1145/1810891.1810910</a></span>. <q>Erlang is conceptually similar to the occam programming language, though it recasts the ideas of CSP in a functional framework and uses asynchronous message passing.</q></cite></span>
</li>
<li id="cite_note-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-30">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20150227174813/http://www.erlang.org/doc/efficiency_guide/processes.html">"Erlang Efficiency Guide – Processes"</a>. Archived from <a rel="nofollow" class="external text" href="http://www.erlang.org/doc/efficiency_guide/processes.html">the original</a> on 27 February 2015.</cite></span>
</li>
<li id="cite_note-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-31">^</a></b></span> <span class="reference-text"><cite id="CITEREFWiger2005" class="citation web cs1">Wiger, Ulf (14 November 2005). <a rel="nofollow" class="external text" href="https://groups.google.com/group/comp.lang.functional/msg/33b7a62afb727a4f?dmode=source">"Stress-testing erlang"</a>. <i>comp.lang.functional.misc</i><span class="reference-accessdate">. Retrieved <span class="nowrap">25 August</span> 2006</span>.</cite></span>
</li>
<li id="cite_note-32"><span class="mw-cite-backlink"><b><a href="#cite_ref-32">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20131224104549/http://erlang.2086793.n4.nabble.com/Lock-free-message-queue-td2550221.html">"Lock-free message queue"</a>. Archived from <a rel="nofollow" class="external text" href="http://erlang.2086793.n4.nabble.com/Lock-free-message-queue-td2550221.html">the original</a> on 24 December 2013<span class="reference-accessdate">. Retrieved <span class="nowrap">23 December</span> 2013</span>.</cite></span>
</li>
<li id="cite_note-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-33">^</a></b></span> <span class="reference-text"><cite id="CITEREFArmstrong" class="citation web cs1">Armstrong, Joe. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20150423182840/http://www.erlang.org/doc/getting_started/robustness.html">"Erlang robustness"</a>. Archived from <a rel="nofollow" class="external text" href="http://www.erlang.org/doc/getting_started/robustness.html">the original</a> on 23 April 2015<span class="reference-accessdate">. Retrieved <span class="nowrap">15 July</span> 2010</span>.</cite></span>
</li>
<li id="cite_note-34"><span class="mw-cite-backlink"><b><a href="#cite_ref-34">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20150206050600/http://www.erlang.org/doc/design_principles/sup_princ.html">"Erlang Supervision principles"</a>. Archived from <a rel="nofollow" class="external text" href="http://www.erlang.org/doc/design_principles/sup_princ.html">the original</a> on 6 February 2015<span class="reference-accessdate">. Retrieved <span class="nowrap">15 July</span> 2010</span>.</cite></span>
</li>
<li id="cite_note-35"><span class="mw-cite-backlink"><b><a href="#cite_ref-35">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://erlang.org/doc/reference_manual/code_loading.html#id90080">"Erlang – Compilation and Code Loading"</a>. <i>erlang.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">21 December</span> 2017</span>.</cite></span>
</li>
<li id="cite_note-36"><span class="mw-cite-backlink"><b><a href="#cite_ref-36">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.it.uu.se/research/group/hipe/">"High Performance Erlang"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">26 March</span> 2011</span>.</cite></span>
</li>
<li id="cite_note-37"><span class="mw-cite-backlink"><b><a href="#cite_ref-37">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://erlang.org/faq/introduction.html#idp32141008">"Who uses Erlang for product development?"</a>. <i>Frequently asked questions about Erlang</i><span class="reference-accessdate">. Retrieved <span class="nowrap">16 July</span> 2007</span>. <q><i>The largest user of Erlang is (surprise!) Ericsson. Ericsson use it to write software used in telecommunications systems. Many dozens of projects have used it, a particularly large one is the extremely scalable AXD301 ATM switch.</i> Other commercial users listed as part of the FAQ include: Nortel, Deutsche Flugsicherung (the German national <a href="Air_traffic_control" title="Air traffic control">air traffic control</a> organisation), and T-Mobile.</q></cite></span>
</li>
<li id="cite_note-38"><span class="mw-cite-backlink"><b><a href="#cite_ref-38">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.ddj.com/linux-open-source/201001928?cid=RSSfeed_DDJ_OpenSource">"Programming Erlang"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">13 December</span> 2008</span>. <q>Virtually all language use shared state concurrency. This is very difficult and leads to terrible problems when you handle failure and scale up the system...Some pretty fast-moving startups in the financial world have latched onto Erlang; for example, the Swedish www.kreditor.se.</q></cite></span>
</li>
<li id="cite_note-39"><span class="mw-cite-backlink"><b><a href="#cite_ref-39">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20071011065959/http://cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&entry=3364027251">"Erlang, the next Java"</a>. Archived from <a rel="nofollow" class="external text" href="http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&entry=3364027251">the original</a> on 11 October 2007<span class="reference-accessdate">. Retrieved <span class="nowrap">8 October</span> 2008</span>. <q>I do not believe that other languages can catch up with Erlang anytime soon. It will be easy for them to add language features to be like Erlang. It will take a long time for them to build such a high-quality VM and the mature libraries for concurrency and reliability. So, Erlang is poised for success. If you want to build a multicore application in the next few years, you should look at Erlang.</q></cite></span>
</li>
<li id="cite_note-40"><span class="mw-cite-backlink"><b><a href="#cite_ref-40">^</a></b></span> <span class="reference-text"><cite id="CITEREFClarke2011" class="citation web cs1">Clarke, Gavin (5 February 2011). <a rel="nofollow" class="external text" href="https://www.theregister.co.uk/2011/02/05/battlestar_galactica_mmp/">"Battlestar Galactica vets needed for online roleplay"</a>. <i>Music and Media</i>. <a href="The_Reg" class="mw-redirect" title="The Reg">The Reg</a><span class="reference-accessdate">. Retrieved <span class="nowrap">8 February</span> 2011</span>.</cite></span>
</li>
</ol></div>
<div class="mw-heading mw-heading2"><h2 id="Further_reading">Further reading</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239549316">
/* start https://en.wikipedia.org/ */
.mw-parser-output .refbegin{margin-bottom:0.5em}.mw-parser-output .refbegin-hanging-indents>ul{margin-left:0}.mw-parser-output .refbegin-hanging-indents>ul>li{margin-left:0;padding-left:3.2em;text-indent:-3.2em}.mw-parser-output .refbegin-hanging-indents ul,.mw-parser-output .refbegin-hanging-indents ul li{list-style:none}@media(max-width:720px){.mw-parser-output .refbegin-hanging-indents>ul>li{padding-left:1.6em;text-indent:-1.6em}}.mw-parser-output .refbegin-columns{margin-top:0.3em}.mw-parser-output .refbegin-columns ul{margin-top:0}.mw-parser-output .refbegin-columns li{page-break-inside:avoid;break-inside:avoid-column}@media screen{.mw-parser-output .refbegin{font-size:90%}}
/* end https://en.wikipedia.org/ */
</style><div class="refbegin" style="">
<ul><li><cite id="CITEREFArmstrong2003" class="citation thesis cs1">Armstrong, Joe (2003). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20150323001245/https://www.sics.se/~joe/thesis/armstrong_thesis_2003.pdf"><i>Making reliable distributed systems in the presence of software errors</i></a> <span class="cs1-format">(PDF)</span> (PhD). The Royal Institute of Technology, Stockholm, Sweden. Archived from <a rel="nofollow" class="external text" href="https://www.sics.se/~joe/thesis/armstrong_thesis_2003.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 23 March 2015<span class="reference-accessdate">. Retrieved <span class="nowrap">13 February</span> 2016</span>.</cite></li>
<li><cite id="CITEREFArmstrong2007" class="citation book cs1">Armstrong, Joe (2007). "A history of Erlang". <i>Proceedings of the third ACM SIGPLAN conference on History of programming languages – HOPL III</i>. pp. <span class="nowrap">6–</span>1. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F1238844.1238850">10.1145/1238844.1238850</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-59593-766-7</bdi>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:555765">555765</a>.</cite></li>
<li><a rel="nofollow" class="external text" href="http://www.erlang.se/publications/bjarnelic.pdf">Early history of Erlang</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20190829000127/http://www.erlang.se/publications/bjarnelic.pdf">Archived</a> 29 August 2019 at the <a href="Wayback_Machine" title="Wayback Machine">Wayback Machine</a> by Bjarne Däcker</li>
<li><cite id="CITEREFMattssonNilssonWikstrom1999" class="citation journal cs1">Mattsson, H.; Nilsson, H.; Wikstrom, C. (1999). "Mnesia – A distributed robust DBMS for telecommunications applications". <i>First International Workshop on Practical Aspects of Declarative Languages (PADL '99)</i>: <span class="nowrap">152–</span>163.</cite></li>
<li><cite id="CITEREFArmstrongVirdingWilliamsWikstrom1996" class="citation book cs1">Armstrong, Joe; Virding, Robert; Williams, Mike; Wikstrom, Claes (16 January 1996). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20120306002430/http://www.erlang.org/erlang_book_toc.html"><i>Concurrent Programming in Erlang</i></a> (2nd ed.). <a href="Prentice_Hall" title="Prentice Hall">Prentice Hall</a>. p. 358. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-13-508301-7</bdi>. Archived from <a rel="nofollow" class="external text" href="http://www.erlang.org/erlang_book_toc.html">the original</a> on 6 March 2012.</cite></li>
<li><cite id="CITEREFArmstrong2007" class="citation book cs1">Armstrong, Joe (11 July 2007). <span class="id-lock-registration" title="Free registration required"><a rel="nofollow" class="external text" href="https://archive.org/details/programmingerlan0000arms/page/536"><i>Programming Erlang: Software for a Concurrent World</i></a></span> (1st ed.). <a href="Pragmatic_Bookshelf" class="mw-redirect" title="Pragmatic Bookshelf">Pragmatic Bookshelf</a>. p. <a rel="nofollow" class="external text" href="https://archive.org/details/programmingerlan0000arms/page/536">536</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-934356-00-5</bdi>.</cite></li>
<li><cite id="CITEREFThompsonCesarini2009" class="citation book cs1">Thompson, Simon J.; Cesarini, Francesco (19 June 2009). <a rel="nofollow" class="external text" href="http://www.erlangprogramming.org"><i>Erlang Programming: A Concurrent Approach to Software Development</i></a> (1st ed.). Sebastopol, California: <a href="O'Reilly_Media" title="O'Reilly Media">O'Reilly Media</a>, Inc. p. 496. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-596-51818-9</bdi>.</cite></li>
<li><cite id="CITEREFLoganMerrittCarlsson2010" class="citation book cs1">Logan, Martin; Merritt, Eric; Carlsson, Richard (28 May 2010). <i>Erlang and OTP in Action</i> (1st ed.). Greenwich, CT: <a href="Manning_Publications" title="Manning Publications">Manning Publications</a>. p. 500. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-933988-78-8</bdi>.</cite></li>
<li><cite id="CITEREFMartin2011" class="citation web cs1">Martin, Brown (10 May 2011). <a rel="nofollow" class="external text" href="http://www.ibm.com/developerworks/opensource/library/os-erlang1/index.html">"Introduction to programming in Erlang, Part 1: The basics"</a>. <i>developerWorks</i>. IBM<span class="reference-accessdate">. Retrieved <span class="nowrap">10 May</span> 2011</span>.</cite></li>
<li><cite id="CITEREFMartin2011" class="citation web cs1">Martin, Brown (17 May 2011). <a rel="nofollow" class="external text" href="http://www.ibm.com/developerworks/opensource/library/os-erlang2/index.html">"Introduction to programming in Erlang, Part 2: Use advanced features and functionality"</a>. <i>developerWorks</i>. IBM<span class="reference-accessdate">. Retrieved <span class="nowrap">17 May</span> 2011</span>.</cite></li>
<li><cite id="CITEREFWiger2001" class="citation web cs1">Wiger, Ulf (30 March 2001). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20190819130310/http://www.erlang.se/publications/Ulf_Wiger.pdf">"Four-fold Increase in Productivity and Quality: Industrial-Strength Functional Programming in Telecom-Class Products"</a> <span class="cs1-format">(PDF)</span>. <i>FEmSYS 2001 Deployment on distributed architectures</i>. Ericsson Telecom AB. Archived from <a rel="nofollow" class="external text" href="http://www.erlang.se/publications/Ulf_Wiger.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 19 August 2019<span class="reference-accessdate">. Retrieved <span class="nowrap">16 September</span> 2014</span>.</cite></li></ul>
</div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1290876196">
/* start https://en.wikipedia.org/ */
.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);display:flow-root}.mw-parser-output .infobox .side-box{font-size:100%}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1237033735">
/* start https://en.wikipedia.org/ */
@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}
/* end https://en.wikipedia.org/ */
</style><div class="side-box side-box-right sistersitebox">
<div class="side-box-flex">
<div class="side-box-image"><span class="noviewer" typeof="mw:File"></span></div>
<div class="side-box-text plainlist">Wikimedia Commons has media related to <span style="font-weight: bold; font-style: italic;"><a href="https://commons.wikimedia.org/wiki/Category:Erlang_(programming_language)" class="extiw external" title="commons:Category:Erlang (programming language)">Erlang (programming language)</a></span>.</div></div>
</div>
<div class="side-box side-box-right sistersitebox">
<div class="side-box-flex">
<div class="side-box-image"><span class="noviewer" typeof="mw:File"></span></div>
<div class="side-box-text plainlist">Wikibooks has a book on the topic of: <i><b><a href="https://en.wikibooks.org/wiki/Erlang_Programming" class="extiw external" title="wikibooks:Erlang Programming">Erlang Programming</a></b></i></div></div>
</div>
<ul><li><a href="https://archive.org/details/ErlangTheMovie" class="extiw external" title="iarchive:ErlangTheMovie">"Erlang: The Movie"</a></li>
<li><span class="official-website"><span class="url"><a rel="nofollow" class="external text" href="https://www.erlang.org/">Official website</a></span></span> </li></ul>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Programming_languages625" style="padding:3px"><table class="nowraplinks hlist mw-collapsible expanded navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div id="Programming_languages625" style="font-size:114%;margin:0 4em"><a href="Programming_language" title="Programming language">Programming languages</a></div></th></tr><tr><td class="navbox-abovebelow" colspan="2"><div>
<ul><li><a href="Comparison_of_programming_languages" title="Comparison of programming languages">Comparison</a></li>
<li><a href="Timeline_of_programming_languages" title="Timeline of programming languages">Timeline</a></li>
<li><a href="History_of_programming_languages" title="History of programming languages">History</a></li></ul>
</div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Ada_(programming_language)" title="Ada (programming language)">Ada</a></li>
<li><a href="ALGOL" title="ALGOL">ALGOL</a>
<ul><li><a href="Simula" title="Simula">Simula</a></li></ul></li>
<li><a href="APL_(programming_language)" title="APL (programming language)">APL</a></li>
<li><a href="Assembly_language" title="Assembly language">Assembly</a></li>
<li><a href="BASIC" title="BASIC">BASIC</a>
<ul><li><a href="Visual_Basic" title="Visual Basic">Visual Basic</a>
<ul><li><a href="Visual_Basic_(classic)" title="Visual Basic (classic)">classic</a></li>
<li><a href="Visual_Basic_(.NET)" title="Visual Basic (.NET)">.NET</a></li></ul></li></ul></li>
<li><a href="C_(programming_language)" title="C (programming language)">C</a></li>
<li><a href="C%2B%2B" title="C++">C++</a></li>
<li><a href="C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a></li>
<li><a href="COBOL" title="COBOL">COBOL</a></li>
<li>
<ul><li><a href="Elixir_(programming_language)" title="Elixir (programming language)">Elixir</a></li></ul></li>
<li><a href="Forth_(programming_language)" title="Forth (programming language)">Forth</a></li>
<li><a href="Fortran" title="Fortran">Fortran</a></li>
<li><a href="Go_(programming_language)" title="Go (programming language)">Go</a></li>
<li><a href="Haskell" title="Haskell">Haskell</a></li>
<li><a href="Java_(programming_language)" title="Java (programming language)">Java</a></li>
<li><a href="JavaScript" title="JavaScript">JavaScript</a></li>
<li><a href="Julia_(programming_language)" title="Julia (programming language)">Julia</a></li>
<li><a href="Kotlin_(programming_language)" title="Kotlin (programming language)">Kotlin</a></li>
<li><a href="Lisp_(programming_language)" title="Lisp (programming language)">Lisp</a></li>
<li><a href="Lua" title="Lua">Lua</a></li>
<li><a href="MATLAB" title="MATLAB">MATLAB</a></li>
<li><a href="ML_(programming_language)" title="ML (programming language)">ML</a>
<ul><li><a href="Caml" title="Caml">Caml </a>
<ul><li><a href="OCaml" title="OCaml">OCaml</a></li></ul></li></ul></li>
<li><a href="Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a>
<ul><li><a href="Object_Pascal" title="Object Pascal">Object Pascal</a></li></ul></li>
<li><a href="Perl" title="Perl">Perl </a>
<ul><li><a href="Raku_(programming_language)" title="Raku (programming language)">Raku</a></li></ul></li>
<li><a href="PHP" title="PHP">PHP</a></li>
<li><a href="Prolog" title="Prolog">Prolog</a></li>
<li><a href="Python_(programming_language)" title="Python (programming language)">Python</a></li>
<li><a href="R_(programming_language)" title="R (programming language)">R</a></li>
<li><a href="Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a></li>
<li><a href="Rust_(programming_language)" title="Rust (programming language)">Rust</a></li>
<li><a href="SAS_language" title="SAS language">SAS</a></li>
<li><a href="SQL" title="SQL">SQL</a></li>
<li><a href="Scratch_(programming_language)" title="Scratch (programming language)">Scratch</a></li>
<li><a href="Shell_script" title="Shell script">Shell</a></li>
<li><a href="Smalltalk" title="Smalltalk">Smalltalk</a></li>
<li><a href="Swift_(programming_language)" title="Swift (programming language)">Swift</a></li>
<li><i><a href="List_of_programming_languages" title="List of programming languages">more...</a></i></li></ul>
</div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div>
<ul><li><span class="noviewer" typeof="mw:File"><span title="List-Class article"></span></span> <b>Lists:</b> <a href="List_of_programming_languages" title="List of programming languages">Alphabetical</a></li>
<li><a href="List_of_programming_languages_by_type" title="List of programming languages by type">Categorical</a></li>
<li><a href="Generational_list_of_programming_languages" title="Generational list of programming languages">Generational</a></li>
<li><a href="Non-English-based_programming_languages" title="Non-English-based programming languages">Non-English-based</a></li>
<li><span class="noviewer" typeof="mw:File"><span title="Category"></span></span> Category</li></ul>
</div></td></tr></tbody></table></div>
<div class="navbox-styles"></div><div role="navigation" class="navbox authority-control" aria-labelledby="Authority_control_databases_frameless&#124;text-top&#124;10px&#124;alt=Edit_this_at_Wikidata&#124;link=https&#58;//www.wikidata.org/wiki/Q334879#identifiers&#124;class=noprint&#124;Edit_this_at_Wikidata719" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Authority_control_databases_frameless&#124;text-top&#124;10px&#124;alt=Edit_this_at_Wikidata&#124;link=https&#58;//www.wikidata.org/wiki/Q334879#identifiers&#124;class=noprint&#124;Edit_this_at_Wikidata719" style="font-size:114%;margin:0 4em">Authority control databases </div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">National</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://d-nb.info/gnd/4324177-3">Germany</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://id.loc.gov/authorities/sh93000031">United States</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://www.nli.org.il/en/authorities/987007544092105171">Israel</a></span></li></ul></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://lux.collections.yale.edu/view/concept/c34e4ba2-f8db-4444-aad9-f0b005c69ff4">Yale LUX</a></span></li></ul></div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-29" href="https://en.wikipedia.org/wiki/?title=Erlang_(programming_language)&oldid=1303143900">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>